package model
{
	/**
	 * Model class representing the Category Object 
	 * @author linden
	 * 
	 */
	public class CategoryVO
	{
		static public var MAX_LEN_NAME:int = 200;
		
		public var id:int;
		private var _name:String;
		// this keeps track of either tasks or projects, depending on current sorting
		[Bindable]
		public var children:Array = new Array();

		public function CategoryVO( name:String = "", id:int=-1)
		{
			this.name = name;
			this.id = id;
		}

		// Seperate setter and getter to enforce max length
		[Bindable]
		public function set name( value:String ):void
		{
			_name = value.slice(0, MAX_LEN_NAME);
		}		
		public function get name():String
		{
			return _name;
		}

		public function get label():String
		{
			return _name;
		}

	}
}